
package gui;

import antlr.collections.List;
import controllers.GUIController;
import hibernate.User;
import java.awt.event.KeyEvent;
import java.awt.event.KeyListener;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.swing.ImageIcon;

@SuppressWarnings("serial")

public class StudentView extends javax.swing.JInternalFrame {

    private GUIController guiC;
    KListener key;
    final StudentView obj_StuView = this;
    
    public StudentView(GUIController m) {
        guiC = m;
        User teacher = guiC.currentUser;
        initComponents();
        populateStudentInfo(); 
        key = new StudentView.KListener();
           obj_StuView.setFocusable(true);
           obj_StuView.addKeyListener(key);
    }
    
     public class KListener implements KeyListener
     {    @Override
           public void keyTyped(KeyEvent e) {
             //  throw new UnsupportedOperationException("Not supported yet.");
           }

           @Override
           public void keyPressed(KeyEvent e) {
              if (e.getKeyCode() == KeyEvent.VK_C)                                 //press ctrl , c together
              {    
                  obj_StuView.setFocusable(true); 
                  guiC.showGUI(new AMyClass(guiC));
                  obj_StuView.dispose();
              }
             //  throw new UnsupportedOperationException("Not supported yet.");
           }
        @Override
           public void keyReleased(KeyEvent e) {
             //  throw new UnsupportedOperationException("Not supported yet.");
           }
       };
     
     
    // This method should popluate the icons and student names for all the
    // studnents in the class.
    private void populateStudentInfo(){
        User teacher = guiC.currentUser;
        ArrayList tempList = new ArrayList();
        tempList = (ArrayList)teacher.getStudentList();
        
        User a;
        Iterator i = tempList.iterator();
        if(i.hasNext()){
            a = (User) i.next();
            studentName1.setText( a.getFirstName()+ " " + a.getLastName());
            studentButton1.setIcon(new ImageIcon(a.getImage().getAbsolutePath()));
            //studentButton1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/gui/child3.png")));
        }
        
        if(i.hasNext()){
            a = (User) i.next();
            studentName2.setText( a.getFirstName()+ " " + a.getLastName());
            studentButton2.setIcon(new ImageIcon(a.getImage().getAbsolutePath()));
            //studentButton2.setIcon(new javax.swing.ImageIcon(getClass().getResource("/gui/child.png")));        
        }
        
        if(i.hasNext()){
            a = (User) i.next();
            studentName3.setText( a.getFirstName()+ " " + a.getLastName());
            studentButton3.setIcon(new ImageIcon(a.getImage().getAbsolutePath()));
            //studentButton3.setIcon(new javax.swing.ImageIcon(getClass().getResource("/gui/child2.png")));        
        }
                
        if(i.hasNext()){
            a = (User) i.next();
            studentName4.setText( a.getFirstName()+ " " + a.getLastName());
            studentButton4.setIcon(new ImageIcon(a.getImage().getAbsolutePath()));
            //studentButton4.setIcon(new javax.swing.ImageIcon(getClass().getResource("/gui/child4.png")));        
        }
                
        if(i.hasNext()){
            a = (User) i.next();
            studentName5.setText( a.getFirstName()+ " " + a.getLastName());
            studentButton5.setIcon(new ImageIcon(a.getImage().getAbsolutePath()));
            //studentButton5.setIcon(new javax.swing.ImageIcon(getClass().getResource("/gui/child.png")));        
        }
                
        if(i.hasNext()){
            a = (User) i.next();
            studentName6.setText( a.getFirstName()+ " " + a.getLastName()); 
            studentButton6.setIcon(new ImageIcon(a.getImage().getAbsolutePath()));
            //studentButton6.setIcon(new javax.swing.ImageIcon(getClass().getResource("/gui/child4.png")));        
        }
                
        if(i.hasNext()){
            a = (User) i.next();
            studentName7.setText( a.getFirstName()+ " " + a.getLastName());
            studentButton7.setIcon(new ImageIcon(a.getImage().getAbsolutePath()));
        }
                
        if(i.hasNext()){
            a = (User) i.next();
            studentName8.setText( a.getFirstName()+ " " + a.getLastName());
            studentButton8.setIcon(new ImageIcon(a.getImage().getAbsolutePath()));
        }
                
        if(i.hasNext()){
            a = (User) i.next();
            studentName9.setText( a.getFirstName()+ " " + a.getLastName());
            studentButton9.setIcon(new ImageIcon(a.getImage().getAbsolutePath()));
        }
                
        if(i.hasNext()){
            a = (User) i.next();
            studentName10.setText( a.getFirstName()+ " " + a.getLastName()); 
            studentButton10.setIcon(new ImageIcon(a.getImage().getAbsolutePath()));
        }
                
        if(i.hasNext()){
            a = (User) i.next();
            studentName11.setText( a.getFirstName()+ " " + a.getLastName());
            studentButton11.setIcon(new ImageIcon(a.getImage().getAbsolutePath()));
        }
                
        if(i.hasNext()){
            a = (User) i.next();
            studentName12.setText( a.getFirstName()+ " " + a.getLastName());
            studentButton12.setIcon(new ImageIcon(a.getImage().getAbsolutePath()));
        }        
    }

    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        bkgrd = new javax.swing.JPanel();
        classRosterPanel = new javax.swing.JPanel();
        jSeparator1 = new javax.swing.JSeparator();
        jSeparator2 = new javax.swing.JSeparator();
        jPanel1 = new javax.swing.JPanel();
        studentButton1 = new javax.swing.JButton();
        studentName1 = new javax.swing.JLabel();
        jPanel2 = new javax.swing.JPanel();
        studentButton2 = new javax.swing.JButton();
        studentName2 = new javax.swing.JLabel();
        jPanel3 = new javax.swing.JPanel();
        studentButton3 = new javax.swing.JButton();
        studentName3 = new javax.swing.JLabel();
        jPanel4 = new javax.swing.JPanel();
        studentButton4 = new javax.swing.JButton();
        studentName4 = new javax.swing.JLabel();
        jPanel5 = new javax.swing.JPanel();
        studentButton5 = new javax.swing.JButton();
        studentName5 = new javax.swing.JLabel();
        jPanel6 = new javax.swing.JPanel();
        studentButton6 = new javax.swing.JButton();
        studentName6 = new javax.swing.JLabel();
        jPanel7 = new javax.swing.JPanel();
        studentButton7 = new javax.swing.JButton();
        studentName7 = new javax.swing.JLabel();
        jPanel8 = new javax.swing.JPanel();
        studentButton8 = new javax.swing.JButton();
        studentName8 = new javax.swing.JLabel();
        jPanel9 = new javax.swing.JPanel();
        studentButton9 = new javax.swing.JButton();
        studentName9 = new javax.swing.JLabel();
        jPanel10 = new javax.swing.JPanel();
        studentButton10 = new javax.swing.JButton();
        studentName10 = new javax.swing.JLabel();
        jPanel11 = new javax.swing.JPanel();
        studentButton11 = new javax.swing.JButton();
        studentName11 = new javax.swing.JLabel();
        jPanel12 = new javax.swing.JPanel();
        studentButton12 = new javax.swing.JButton();
        studentName12 = new javax.swing.JLabel();

        bkgrd.setBackground(new java.awt.Color(0, 102, 255));
        bkgrd.setPreferredSize(new java.awt.Dimension(1280, 800));

        classRosterPanel.setBackground(new java.awt.Color(51, 153, 255));
        classRosterPanel.setBorder(javax.swing.BorderFactory.createTitledBorder("My Students"));
        classRosterPanel.setAlignmentX(0.0F);
        classRosterPanel.setAlignmentY(0.0F);
        classRosterPanel.setPreferredSize(new java.awt.Dimension(525, 425));

        jPanel1.setBackground(new java.awt.Color(153, 153, 153));
        jPanel1.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
        jPanel1.setAlignmentX(0.0F);
        jPanel1.setAlignmentY(0.0F);
        jPanel1.setPreferredSize(new java.awt.Dimension(125, 150));

        studentButton1.setAlignmentY(0.0F);
        studentButton1.setVerticalAlignment(javax.swing.SwingConstants.TOP);
        studentButton1.setVerticalTextPosition(javax.swing.SwingConstants.TOP);
        
        
        studentButton1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                try {
                    studentButton1ActionPerformed(evt);
                } catch (IOException ex) {
                    Logger.getLogger(StudentView.class.getName()).log(Level.SEVERE, null, ex);
                }
            }
        });

        org.jdesktop.layout.GroupLayout jPanel1Layout = new org.jdesktop.layout.GroupLayout(jPanel1);
        jPanel1.setLayout(jPanel1Layout);
        jPanel1Layout.setHorizontalGroup(
            jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(org.jdesktop.layout.GroupLayout.TRAILING, jPanel1Layout.createSequentialGroup()
                .addContainerGap(21, Short.MAX_VALUE)
                .add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                    .add(studentButton1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 87, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                    .add(jPanel1Layout.createSequentialGroup()
                        .add(6, 6, 6)
                        .add(studentName1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 72, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)))
                .add(15, 15, 15))
        );
        jPanel1Layout.setVerticalGroup(
            jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(jPanel1Layout.createSequentialGroup()
                .addContainerGap()
                .add(studentButton1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 110, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(studentName1)
                .addContainerGap(org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        jPanel2.setBackground(new java.awt.Color(153, 153, 153));
        jPanel2.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
        jPanel2.setAlignmentX(0.0F);
        jPanel2.setAlignmentY(0.0F);
        jPanel2.setPreferredSize(new java.awt.Dimension(125, 150));

        studentButton2.setAlignmentY(0.0F);
        studentButton2.setMaximumSize(new java.awt.Dimension(112, 108));
        studentButton2.setMinimumSize(new java.awt.Dimension(112, 108));
        studentButton2.setPreferredSize(new java.awt.Dimension(112, 108));
        studentButton2.setVerticalAlignment(javax.swing.SwingConstants.TOP);
        
        studentButton2.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                try {
                    studentButton2ActionPerformed(evt);
                } catch (IOException ex) {
                    Logger.getLogger(StudentView.class.getName()).log(Level.SEVERE, null, ex);
                }
            }
        });

        org.jdesktop.layout.GroupLayout jPanel2Layout = new org.jdesktop.layout.GroupLayout(jPanel2);
        jPanel2.setLayout(jPanel2Layout);
        jPanel2Layout.setHorizontalGroup(
            jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(org.jdesktop.layout.GroupLayout.TRAILING, jPanel2Layout.createSequentialGroup()
                .addContainerGap(20, Short.MAX_VALUE)
                .add(jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                    .add(jPanel2Layout.createSequentialGroup()
                        .add(6, 6, 6)
                        .add(studentName2, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 71, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                    .add(studentButton2, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 87, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                .add(16, 16, 16))
        );
        jPanel2Layout.setVerticalGroup(
            jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(jPanel2Layout.createSequentialGroup()
                .addContainerGap()
                .add(studentButton2, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 110, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(studentName2)
                .addContainerGap(32, Short.MAX_VALUE))
        );

        jPanel3.setBackground(new java.awt.Color(153, 153, 153));
        jPanel3.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
        jPanel3.setAlignmentX(0.0F);
        jPanel3.setAlignmentY(0.0F);
        jPanel3.setPreferredSize(new java.awt.Dimension(125, 150));

        studentButton3.setAlignmentY(0.0F);
        studentButton3.setMaximumSize(new java.awt.Dimension(112, 108));
        studentButton3.setMinimumSize(new java.awt.Dimension(112, 108));
        studentButton3.setPreferredSize(new java.awt.Dimension(112, 108));
        studentButton3.setVerticalAlignment(javax.swing.SwingConstants.TOP);
        
        studentButton3.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                try {
                    studentButton3ActionPerformed(evt);
                } catch (IOException ex) {
                    Logger.getLogger(StudentView.class.getName()).log(Level.SEVERE, null, ex);
                }
            }
        });

        org.jdesktop.layout.GroupLayout jPanel3Layout = new org.jdesktop.layout.GroupLayout(jPanel3);
        jPanel3.setLayout(jPanel3Layout);
        jPanel3Layout.setHorizontalGroup(
            jPanel3Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(org.jdesktop.layout.GroupLayout.TRAILING, jPanel3Layout.createSequentialGroup()
                .addContainerGap(21, Short.MAX_VALUE)
                .add(jPanel3Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                    .add(jPanel3Layout.createSequentialGroup()
                        .add(6, 6, 6)
                        .add(studentName3, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 73, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                    .add(studentButton3, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 87, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                .add(15, 15, 15))
        );
        jPanel3Layout.setVerticalGroup(
            jPanel3Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(jPanel3Layout.createSequentialGroup()
                .addContainerGap()
                .add(studentButton3, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 110, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(studentName3)
                .addContainerGap(org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        jPanel4.setBackground(new java.awt.Color(153, 153, 153));
        jPanel4.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
        jPanel4.setAlignmentX(0.0F);
        jPanel4.setAlignmentY(0.0F);
        jPanel4.setMinimumSize(new java.awt.Dimension(0, 0));
        jPanel4.setPreferredSize(new java.awt.Dimension(125, 150));

        studentButton4.setAlignmentY(0.0F);
        studentButton4.setMaximumSize(new java.awt.Dimension(112, 108));
        studentButton4.setMinimumSize(new java.awt.Dimension(112, 108));
        studentButton4.setPreferredSize(new java.awt.Dimension(112, 108));
        studentButton4.setVerticalAlignment(javax.swing.SwingConstants.TOP);
        
                
        studentButton4.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                try {
                    studentButton4ActionPerformed(evt);
                } catch (IOException ex) {
                    Logger.getLogger(StudentView.class.getName()).log(Level.SEVERE, null, ex);
                }
            }
        });

        org.jdesktop.layout.GroupLayout jPanel4Layout = new org.jdesktop.layout.GroupLayout(jPanel4);
        jPanel4.setLayout(jPanel4Layout);
        jPanel4Layout.setHorizontalGroup(
            jPanel4Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(org.jdesktop.layout.GroupLayout.TRAILING, jPanel4Layout.createSequentialGroup()
                .addContainerGap(20, Short.MAX_VALUE)
                .add(jPanel4Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                    .add(jPanel4Layout.createSequentialGroup()
                        .add(6, 6, 6)
                        .add(studentName4, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 73, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                    .add(studentButton4, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 87, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                .add(16, 16, 16))
        );
        jPanel4Layout.setVerticalGroup(
            jPanel4Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(jPanel4Layout.createSequentialGroup()
                .addContainerGap()
                .add(studentButton4, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 110, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(studentName4)
                .addContainerGap())
        );

        jPanel5.setBackground(new java.awt.Color(153, 153, 153));
        jPanel5.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
        jPanel5.setAlignmentX(0.0F);
        jPanel5.setAlignmentY(0.0F);
        jPanel5.setPreferredSize(new java.awt.Dimension(125, 150));

        studentButton5.setAlignmentY(0.0F);
        studentButton5.setMaximumSize(new java.awt.Dimension(112, 108));
        studentButton5.setMinimumSize(new java.awt.Dimension(112, 108));
        studentButton5.setPreferredSize(new java.awt.Dimension(112, 108));
        studentButton5.setVerticalAlignment(javax.swing.SwingConstants.TOP);
          
        studentButton5.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                try {
                    studentButton5ActionPerformed(evt);
                } catch (IOException ex) {
                    Logger.getLogger(StudentView.class.getName()).log(Level.SEVERE, null, ex);
                }
            }
        });

        org.jdesktop.layout.GroupLayout jPanel5Layout = new org.jdesktop.layout.GroupLayout(jPanel5);
        jPanel5.setLayout(jPanel5Layout);
        jPanel5Layout.setHorizontalGroup(
            jPanel5Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(org.jdesktop.layout.GroupLayout.TRAILING, jPanel5Layout.createSequentialGroup()
                .addContainerGap(19, Short.MAX_VALUE)
                .add(jPanel5Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                    .add(jPanel5Layout.createSequentialGroup()
                        .add(6, 6, 6)
                        .add(studentName5, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 72, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                    .add(studentButton5, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 87, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                .add(17, 17, 17))
        );
        jPanel5Layout.setVerticalGroup(
            jPanel5Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(jPanel5Layout.createSequentialGroup()
                .addContainerGap()
                .add(studentButton5, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 110, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(studentName5)
                .addContainerGap(41, Short.MAX_VALUE))
        );

        jPanel6.setBackground(new java.awt.Color(153, 153, 153));
        jPanel6.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
        jPanel6.setAlignmentX(0.0F);
        jPanel6.setAlignmentY(0.0F);
        jPanel6.setPreferredSize(new java.awt.Dimension(125, 150));

        studentButton6.setAlignmentY(0.0F);
        studentButton6.setMaximumSize(new java.awt.Dimension(112, 108));
        studentButton6.setMinimumSize(new java.awt.Dimension(112, 108));
        studentButton6.setPreferredSize(new java.awt.Dimension(112, 108));
        studentButton6.setVerticalAlignment(javax.swing.SwingConstants.TOP);
        
        studentButton6.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                try {
                    studentButton6ActionPerformed(evt);
                } catch (IOException ex) {
                    Logger.getLogger(StudentView.class.getName()).log(Level.SEVERE, null, ex);
                }
            }
        });

        org.jdesktop.layout.GroupLayout jPanel6Layout = new org.jdesktop.layout.GroupLayout(jPanel6);
        jPanel6.setLayout(jPanel6Layout);
        jPanel6Layout.setHorizontalGroup(
            jPanel6Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(org.jdesktop.layout.GroupLayout.TRAILING, jPanel6Layout.createSequentialGroup()
                .addContainerGap(19, Short.MAX_VALUE)
                .add(jPanel6Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                    .add(jPanel6Layout.createSequentialGroup()
                        .add(6, 6, 6)
                        .add(studentName6, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 72, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                    .add(studentButton6, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 87, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                .add(17, 17, 17))
        );
        jPanel6Layout.setVerticalGroup(
            jPanel6Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(jPanel6Layout.createSequentialGroup()
                .addContainerGap()
                .add(studentButton6, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 110, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(studentName6)
                .addContainerGap(org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        jPanel7.setBackground(new java.awt.Color(153, 153, 153));
        jPanel7.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
        jPanel7.setAlignmentX(0.0F);
        jPanel7.setAlignmentY(0.0F);
        jPanel7.setPreferredSize(new java.awt.Dimension(125, 150));

        studentButton7.setAlignmentY(0.0F);
        studentButton7.setMaximumSize(new java.awt.Dimension(112, 108));
        studentButton7.setMinimumSize(new java.awt.Dimension(112, 108));
        studentButton7.setPreferredSize(new java.awt.Dimension(112, 108));
        studentButton7.setVerticalAlignment(javax.swing.SwingConstants.TOP);
        
        studentButton7.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                try {
                    studentButton7ActionPerformed(evt);
                } catch (IOException ex) {
                    Logger.getLogger(StudentView.class.getName()).log(Level.SEVERE, null, ex);
                }
            }
        });

        org.jdesktop.layout.GroupLayout jPanel7Layout = new org.jdesktop.layout.GroupLayout(jPanel7);
        jPanel7.setLayout(jPanel7Layout);
        jPanel7Layout.setHorizontalGroup(
            jPanel7Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(org.jdesktop.layout.GroupLayout.TRAILING, jPanel7Layout.createSequentialGroup()
                .addContainerGap(19, Short.MAX_VALUE)
                .add(jPanel7Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                    .add(jPanel7Layout.createSequentialGroup()
                        .add(6, 6, 6)
                        .add(studentName7, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 70, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                    .add(studentButton7, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 87, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                .add(17, 17, 17))
        );
        jPanel7Layout.setVerticalGroup(
            jPanel7Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(jPanel7Layout.createSequentialGroup()
                .addContainerGap()
                .add(studentButton7, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 110, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(studentName7)
                .addContainerGap(org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        jPanel8.setBackground(new java.awt.Color(153, 153, 153));
        jPanel8.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
        jPanel8.setAlignmentX(0.0F);
        jPanel8.setAlignmentY(0.0F);
        jPanel8.setPreferredSize(new java.awt.Dimension(125, 150));

        studentButton8.setAlignmentY(0.0F);
        studentButton8.setMaximumSize(new java.awt.Dimension(112, 108));
        studentButton8.setMinimumSize(new java.awt.Dimension(112, 108));
        studentButton8.setPreferredSize(new java.awt.Dimension(112, 108));
        studentButton8.setVerticalAlignment(javax.swing.SwingConstants.TOP);
        
        studentButton8.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                try {
                    studentButton8ActionPerformed(evt);
                } catch (IOException ex) {
                    Logger.getLogger(StudentView.class.getName()).log(Level.SEVERE, null, ex);
                }
            }
        });

        org.jdesktop.layout.GroupLayout jPanel8Layout = new org.jdesktop.layout.GroupLayout(jPanel8);
        jPanel8.setLayout(jPanel8Layout);
        jPanel8Layout.setHorizontalGroup(
            jPanel8Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(org.jdesktop.layout.GroupLayout.TRAILING, jPanel8Layout.createSequentialGroup()
                .addContainerGap(20, Short.MAX_VALUE)
                .add(jPanel8Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                    .add(jPanel8Layout.createSequentialGroup()
                        .add(6, 6, 6)
                        .add(studentName8, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 71, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                    .add(studentButton8, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 87, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                .add(16, 16, 16))
        );
        jPanel8Layout.setVerticalGroup(
            jPanel8Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(jPanel8Layout.createSequentialGroup()
                .addContainerGap()
                .add(studentButton8, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 110, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(studentName8)
                .addContainerGap(org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        jPanel9.setBackground(new java.awt.Color(153, 153, 153));
        jPanel9.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
        jPanel9.setAlignmentX(0.0F);
        jPanel9.setAlignmentY(0.0F);
        jPanel9.setPreferredSize(new java.awt.Dimension(125, 150));

        studentButton9.setAlignmentY(0.0F);
        studentButton9.setMaximumSize(new java.awt.Dimension(112, 108));
        studentButton9.setMinimumSize(new java.awt.Dimension(112, 108));
        studentButton9.setPreferredSize(new java.awt.Dimension(112, 108));
        studentButton9.setVerticalAlignment(javax.swing.SwingConstants.TOP);
        
                
        studentButton9.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                try {
                    studentButton9ActionPerformed(evt);
                } catch (IOException ex) {
                    Logger.getLogger(StudentView.class.getName()).log(Level.SEVERE, null, ex);
                }
            }
        });

        org.jdesktop.layout.GroupLayout jPanel9Layout = new org.jdesktop.layout.GroupLayout(jPanel9);
        jPanel9.setLayout(jPanel9Layout);
        jPanel9Layout.setHorizontalGroup(
            jPanel9Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(org.jdesktop.layout.GroupLayout.TRAILING, jPanel9Layout.createSequentialGroup()
                .addContainerGap(19, Short.MAX_VALUE)
                .add(jPanel9Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                    .add(jPanel9Layout.createSequentialGroup()
                        .add(6, 6, 6)
                        .add(studentName9, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 72, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                    .add(studentButton9, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 87, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                .add(17, 17, 17))
        );
        jPanel9Layout.setVerticalGroup(
            jPanel9Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(jPanel9Layout.createSequentialGroup()
                .addContainerGap()
                .add(studentButton9, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 110, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(studentName9)
                .addContainerGap(38, Short.MAX_VALUE))
        );

        jPanel10.setBackground(new java.awt.Color(153, 153, 153));
        jPanel10.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
        jPanel10.setAlignmentX(0.0F);
        jPanel10.setAlignmentY(0.0F);
        jPanel10.setPreferredSize(new java.awt.Dimension(125, 150));

        studentButton10.setAlignmentY(0.0F);
        studentButton10.setMaximumSize(new java.awt.Dimension(112, 108));
        studentButton10.setMinimumSize(new java.awt.Dimension(112, 108));
        studentButton10.setPreferredSize(new java.awt.Dimension(112, 108));
        studentButton10.setVerticalAlignment(javax.swing.SwingConstants.TOP);
        
        studentButton10.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                try {
                    studentButton10ActionPerformed(evt);
                } catch (IOException ex) {
                    Logger.getLogger(StudentView.class.getName()).log(Level.SEVERE, null, ex);
                }
            }
        });

        org.jdesktop.layout.GroupLayout jPanel10Layout = new org.jdesktop.layout.GroupLayout(jPanel10);
        jPanel10.setLayout(jPanel10Layout);
        jPanel10Layout.setHorizontalGroup(
            jPanel10Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(org.jdesktop.layout.GroupLayout.TRAILING, jPanel10Layout.createSequentialGroup()
                .addContainerGap(19, Short.MAX_VALUE)
                .add(jPanel10Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                    .add(jPanel10Layout.createSequentialGroup()
                        .add(6, 6, 6)
                        .add(studentName10, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 72, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                    .add(studentButton10, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 87, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                .add(17, 17, 17))
        );
        jPanel10Layout.setVerticalGroup(
            jPanel10Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(jPanel10Layout.createSequentialGroup()
                .addContainerGap()
                .add(studentButton10, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 110, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(studentName10)
                .addContainerGap(org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        jPanel11.setBackground(new java.awt.Color(153, 153, 153));
        jPanel11.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
        jPanel11.setAlignmentX(0.0F);
        jPanel11.setAlignmentY(0.0F);
        jPanel11.setPreferredSize(new java.awt.Dimension(125, 150));

        studentButton11.setAlignmentY(0.0F);
        studentButton11.setMaximumSize(new java.awt.Dimension(112, 108));
        studentButton11.setMinimumSize(new java.awt.Dimension(112, 108));
        studentButton11.setPreferredSize(new java.awt.Dimension(112, 108));
        studentButton11.setVerticalAlignment(javax.swing.SwingConstants.TOP);
        
        studentButton11.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                try {
                    studentButton11ActionPerformed(evt);
                } catch (IOException ex) {
                    Logger.getLogger(StudentView.class.getName()).log(Level.SEVERE, null, ex);
                }
            }
        });

        org.jdesktop.layout.GroupLayout jPanel11Layout = new org.jdesktop.layout.GroupLayout(jPanel11);
        jPanel11.setLayout(jPanel11Layout);
        jPanel11Layout.setHorizontalGroup(
            jPanel11Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(org.jdesktop.layout.GroupLayout.TRAILING, jPanel11Layout.createSequentialGroup()
                .addContainerGap(19, Short.MAX_VALUE)
                .add(jPanel11Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                    .add(jPanel11Layout.createSequentialGroup()
                        .add(6, 6, 6)
                        .add(studentName11, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 70, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                    .add(studentButton11, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 87, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                .add(17, 17, 17))
        );
        jPanel11Layout.setVerticalGroup(
            jPanel11Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(jPanel11Layout.createSequentialGroup()
                .addContainerGap()
                .add(studentButton11, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 110, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(studentName11)
                .addContainerGap(org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        jPanel12.setBackground(new java.awt.Color(153, 153, 153));
        jPanel12.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
        jPanel12.setAlignmentX(0.0F);
        jPanel12.setAlignmentY(0.0F);
        jPanel12.setPreferredSize(new java.awt.Dimension(125, 150));

        studentButton12.setAlignmentY(0.0F);
        studentButton12.setMaximumSize(new java.awt.Dimension(112, 108));
        studentButton12.setMinimumSize(new java.awt.Dimension(112, 108));
        studentButton12.setPreferredSize(new java.awt.Dimension(112, 108));
        studentButton12.setVerticalAlignment(javax.swing.SwingConstants.TOP);
        studentButton12.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                try {
                    studentButton12ActionPerformed(evt);
                } catch (IOException ex) {
                    Logger.getLogger(StudentView.class.getName()).log(Level.SEVERE, null, ex);
                }
            }
        });

        org.jdesktop.layout.GroupLayout jPanel12Layout = new org.jdesktop.layout.GroupLayout(jPanel12);
        jPanel12.setLayout(jPanel12Layout);
        jPanel12Layout.setHorizontalGroup(
            jPanel12Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(org.jdesktop.layout.GroupLayout.TRAILING, jPanel12Layout.createSequentialGroup()
                .addContainerGap(20, Short.MAX_VALUE)
                .add(jPanel12Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                    .add(jPanel12Layout.createSequentialGroup()
                        .add(6, 6, 6)
                        .add(studentName12, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 71, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                    .add(studentButton12, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 87, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                .add(16, 16, 16))
        );
        jPanel12Layout.setVerticalGroup(
            jPanel12Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(jPanel12Layout.createSequentialGroup()
                .addContainerGap()
                .add(studentButton12, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 110, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(studentName12)
                .addContainerGap(org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        org.jdesktop.layout.GroupLayout classRosterPanelLayout = new org.jdesktop.layout.GroupLayout(classRosterPanel);
        classRosterPanel.setLayout(classRosterPanelLayout);
        classRosterPanelLayout.setHorizontalGroup(
            classRosterPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(classRosterPanelLayout.createSequentialGroup()
                .addContainerGap()
                .add(classRosterPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                    .add(org.jdesktop.layout.GroupLayout.TRAILING, jSeparator2)
                    .add(jSeparator1)
                    .add(classRosterPanelLayout.createSequentialGroup()
                        .add(classRosterPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                            .add(classRosterPanelLayout.createSequentialGroup()
                                .add(jPanel1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED)
                                .add(jPanel2, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED)
                                .add(jPanel3, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED)
                                .add(jPanel4, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                            .add(classRosterPanelLayout.createSequentialGroup()
                                .add(jPanel5, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED)
                                .add(jPanel6, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED)
                                .add(jPanel7, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED)
                                .add(jPanel8, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                            .add(classRosterPanelLayout.createSequentialGroup()
                                .add(jPanel9, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED)
                                .add(jPanel10, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED)
                                .add(jPanel11, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED)
                                .add(jPanel12, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)))
                        .add(0, 941, Short.MAX_VALUE)))

                .addContainerGap())
        );
        classRosterPanelLayout.setVerticalGroup(
            classRosterPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(org.jdesktop.layout.GroupLayout.TRAILING, classRosterPanelLayout.createSequentialGroup()
                .add(classRosterPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING, false)
                    .add(jPanel2, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 161, Short.MAX_VALUE)
                    .add(jPanel3, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 161, Short.MAX_VALUE)
                    .add(jPanel1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 161, Short.MAX_VALUE)
                    .add(jPanel4, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 161, Short.MAX_VALUE))
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED)
                .add(jSeparator1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED)
                .add(classRosterPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                    .add(jPanel5, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 170, Short.MAX_VALUE)
                    .add(jPanel6, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 170, Short.MAX_VALUE)
                    .add(jPanel7, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 170, Short.MAX_VALUE)
                    .add(jPanel8, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 170, Short.MAX_VALUE))
                .add(18, 18, 18)
                .add(jSeparator2, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED)
                .add(classRosterPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                    .add(jPanel9, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 167, Short.MAX_VALUE)
                    .add(jPanel10, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 167, Short.MAX_VALUE)
                    .add(jPanel11, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 167, Short.MAX_VALUE)
                    .add(jPanel12, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 167, Short.MAX_VALUE))
                .add(74, 74, 74))
        );

        org.jdesktop.layout.GroupLayout bkgrdLayout = new org.jdesktop.layout.GroupLayout(bkgrd);
        bkgrd.setLayout(bkgrdLayout);
        bkgrdLayout.setHorizontalGroup(
            bkgrdLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(bkgrdLayout.createSequentialGroup()
                .addContainerGap()
                .add(bkgrdLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                    .add(classRosterPanel, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 1513, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(470, Short.MAX_VALUE))
                .add(classRosterPanel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 1467, Short.MAX_VALUE)
        );
        bkgrdLayout.setVerticalGroup(
            bkgrdLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(bkgrdLayout.createSequentialGroup()
                .addContainerGap()
                .add(classRosterPanel, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 650, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                .add(18, 18, 18)
                .addContainerGap(360, Short.MAX_VALUE))
        );

        org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(layout.createSequentialGroup()
                .add(bkgrd, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 1995, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                .add(0, 0, Short.MAX_VALUE))
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(layout.createSequentialGroup()
                .add(bkgrd, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 1098, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                .add(0, 4, Short.MAX_VALUE))
        );

        pack();
    }
    
    
    
    private void studentButton1ActionPerformed(java.awt.event.ActionEvent evt) throws IOException {
        User user = guiC.currentUser;
        
        ArrayList tempList = new ArrayList();
        tempList = (ArrayList)user.getStudentList();
        User student;
        student = (User)tempList.get(0); // ATTENTION!! the index is off by 1 starting at index 0 for the first student
        guiC.showGUI(new Student_Schedule_DnD(guiC,student));
        obj_StuView.dispose();
    }
    
    private void studentButton2ActionPerformed(java.awt.event.ActionEvent evt) throws IOException { 
        User user = guiC.currentUser;
        ArrayList tempList = new ArrayList();
        tempList = (ArrayList)user.getStudentList();
        User student;
        student = (User)tempList.get(1);
        // if(user.getFirstName() == "")
        guiC.showGUI(new Student_Schedule_DnD(guiC, student)); 
        obj_StuView.dispose();
    }
    
    private void studentButton3ActionPerformed(java.awt.event.ActionEvent evt) throws IOException {                
        User user = guiC.currentUser;
        ArrayList tempList = new ArrayList();
        tempList = (ArrayList)user.getStudentList();
        User student;
        student = (User)tempList.get(2);
        guiC.showGUI(new Student_Schedule_DnD(guiC, student));
        obj_StuView.dispose();
    }
    
    private void studentButton4ActionPerformed(java.awt.event.ActionEvent evt) throws IOException {                
        User user = guiC.currentUser;
        ArrayList tempList = new ArrayList();
        tempList = (ArrayList)user.getStudentList();
        User student;
        student = (User)tempList.get(3);
        guiC.showGUI(new Student_Schedule_DnD(guiC, student)); 
        obj_StuView.dispose();
    }
    
    private void studentButton5ActionPerformed(java.awt.event.ActionEvent evt) throws IOException {                
        User user = guiC.currentUser;
        ArrayList tempList = new ArrayList();
        tempList = (ArrayList)user.getStudentList();
        User student;
        student = (User)tempList.get(4);
        guiC.showGUI(new Student_Schedule_DnD(guiC, student));
        obj_StuView.dispose();
    }

    private void studentButton6ActionPerformed(java.awt.event.ActionEvent evt) throws IOException {                
        User user = guiC.currentUser;
        ArrayList tempList = new ArrayList();
        tempList = (ArrayList)user.getStudentList();
        User student;
        student = (User)tempList.get(5);
        guiC.showGUI(new Student_Schedule_DnD(guiC, student)); 
        obj_StuView.dispose();
    }

    private void studentButton7ActionPerformed(java.awt.event.ActionEvent evt) throws IOException {                
        User user = guiC.currentUser;
        ArrayList tempList = new ArrayList();
        tempList = (ArrayList)user.getStudentList();
        User student;
        student = (User)tempList.get(6);
        guiC.showGUI(new Student_Schedule_DnD(guiC, student));
        obj_StuView.dispose();
    }

    private void studentButton8ActionPerformed(java.awt.event.ActionEvent evt) throws IOException {                
        User user = guiC.currentUser;
        ArrayList tempList = new ArrayList();
        tempList = (ArrayList)user.getStudentList();
        User student;
        student = (User)tempList.get(7);
        guiC.showGUI(new Student_Schedule_DnD(guiC, student));
        obj_StuView.dispose();
    }
    
    private void studentButton9ActionPerformed(java.awt.event.ActionEvent evt) throws IOException {                
        User user = guiC.currentUser;
        ArrayList tempList = new ArrayList();
        tempList = (ArrayList)user.getStudentList();
        User student;
        student = (User)tempList.get(8);
        guiC.showGUI(new Student_Schedule_DnD(guiC, student));
    }

    private void studentButton10ActionPerformed(java.awt.event.ActionEvent evt) throws IOException {                
        User user = guiC.currentUser;
        ArrayList tempList = new ArrayList();
        tempList = (ArrayList)user.getStudentList();
        User student;
        student = (User)tempList.get(9);
        guiC.showGUI(new Student_Schedule_DnD(guiC, student));    }

    private void studentButton11ActionPerformed(java.awt.event.ActionEvent evt) throws IOException {                
        User user = guiC.currentUser;
        ArrayList tempList = new ArrayList();
        tempList = (ArrayList)user.getStudentList();
        User student;
        student = (User)tempList.get(10);
        guiC.showGUI(new Student_Schedule_DnD(guiC, student));    }

    private void studentButton12ActionPerformed(java.awt.event.ActionEvent evt) throws IOException {                
        User user = guiC.currentUser;
        ArrayList tempList = new ArrayList();
        tempList = (ArrayList)user.getStudentList();
        User student;
        student = (User)tempList.get(11);
        guiC.showGUI(new Student_Schedule_DnD(guiC,student));
        obj_StuView.dispose();
    }

   
    // Variables declaration
    private javax.swing.JPanel bkgrd;
    private javax.swing.JPanel classRosterPanel;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JPanel jPanel10;
    private javax.swing.JPanel jPanel11;
    private javax.swing.JPanel jPanel12;
    private javax.swing.JPanel jPanel2;
    private javax.swing.JPanel jPanel3;
    private javax.swing.JPanel jPanel4;
    private javax.swing.JPanel jPanel5;
    private javax.swing.JPanel jPanel6;
    private javax.swing.JPanel jPanel7;
    private javax.swing.JPanel jPanel8;
    private javax.swing.JPanel jPanel9;
    private javax.swing.JSeparator jSeparator1;
    private javax.swing.JSeparator jSeparator2;
    private javax.swing.JButton studentButton1;
    private javax.swing.JButton studentButton10;
    private javax.swing.JButton studentButton11;
    private javax.swing.JButton studentButton12;
    private javax.swing.JButton studentButton2;
    private javax.swing.JButton studentButton3;
    private javax.swing.JButton studentButton4;
    private javax.swing.JButton studentButton5;
    private javax.swing.JButton studentButton6;
    private javax.swing.JButton studentButton7;
    private javax.swing.JButton studentButton8;
    private javax.swing.JButton studentButton9;
    private javax.swing.JLabel studentName1;
    private javax.swing.JLabel studentName10;
    private javax.swing.JLabel studentName11;
    private javax.swing.JLabel studentName12;
    private javax.swing.JLabel studentName2;
    private javax.swing.JLabel studentName3;
    private javax.swing.JLabel studentName4;
    private javax.swing.JLabel studentName5;
    private javax.swing.JLabel studentName6;
    private javax.swing.JLabel studentName7;
    private javax.swing.JLabel studentName8;
    private javax.swing.JLabel studentName9;
    // End of variables declaration
}
